package com.manage.utils;

import android.content.Context;
import android.content.Intent;

public class AppConstans {
	public static final String LOG_TAG = "@@@";
	public static final String UTF_8 = "utf-8";
	public static final String USERINFO_SHARED_PREFERENCES = "user_info";
	public static final String APPLICATION_SHARED_PREFERENCES = "application_pref";

	public static final String USERINFO_MOBILE = "Mobi";
	public static final String USERINFO_TIME = "Time";
	public static final String USERINFO_VERIFICATION_CODE = "Code";// 验证码字段
	public static final String USERINFO_LAST_TIME_DATE = "Date"; // 上次月经开始时间
	public static final String USERINFO_CYCLE = "Cycle"; // 月经周期
	public static final String USERINFO_PERIOD = "Count"; // 持续时间

	public static final String USERINFO_SMS_NOTICE = "Switch";// 短信提醒开关
	public static final String USERINFO_PERIOD_NOTICE = "period_notice";
	public static final String USERINFO_TAKE_PILL_NOTICE = "take_pill_notice";
	public static final String USERINFO_CITY = "City";
	public static final String USERINFO_NAME = "Name";
	public static final String USERINFO_PASSWORD = "password";

	public static final String APPLICATION_UPDATE_NOTICE = "update_notice";
	public static final String APPLICATION_VERSION = "version";

	public static final String QUESTION_TITLE = "Title";// 问题标题
	public static final String QUESTION_CONTENTS = "Ques"; // 问题内容

	public static final String MOBILE_MODEL = "Model"; // 设备号

	public static final String UPDATE_NUMBER = "update_number";

	public static final String INTERFACE_URL = "http://product.moad.cn/BayerSendSMS2010/Default.aspx";
	public static final String UPDATE_INTERFACE_URL = "http://wap.moad.cn/moad/10650/update_page.aspx";
	// public static final String OFFICIAL_URL =
	// "http://www.yousiming.com/index.php";// 链接官网
	public static final String OFFICIAL_URL = "http://wap.yoyoclub.mobi";
	public static final String UPDATE_INFO_URL = "http://www.yousiming.com/index.php";// 查看更新网址

	public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

	public static final String IS_POST_QUESTION_SUCCESS = "isSuccess";

	public static final String LAST_PAGE_FLAG = "lastPageFlag";

	public static final String TAKE_PILL_NOTICE_TIME = "TakePillNoticeTime";
	public static final String PERIOD_NOTICE_TIME = "periodNoticeTime";

	public static final int dayPeriodFlag1 = 0; // 以下为经期的各个阶段标记
	public static final int dayPeriodFlag2 = 1;
	public static final int dayPeriodFlag3 = 2;
	public static final int dayPeriodFlag4 = 3;
	public static final int dayPeriodFlag5 = 4;
	public static final int dayPeriodFlag6 = 5;
	public static final int dayPeriodFlag7 = 6;
	public static final int dayPeriodFlag8 = 7;
	public static final int dayPeriodFlag9 = 8;
	public static final int dayOvipositFlag = 9;
	public static final int dayConceptionFlag = 10;
	public static final int daySafetyFlag = 11;

	public static final int dayOviposiNumber = 14; // 以下为计算经期所需要的几个特殊天数
	public static final int dayPrevOviposiNumber = 5;
	public static final int dayNextOviposiNumber = 4;

	public static final String IS_MOBILE_PHONE = "^((13[0-9])|(15[^4,\\D])|(18[0,2,5-9])|(14[5,7]))\\d{8}$"; // 判断是否是手机号码的正则表达式
	public static final String PASSWORD_FORMAT = "[0-9a-zA-Z]{6,15}"; // 判断密码格式的正则表达式

	public static final int Milliseconds_Per_Day = 24 * 3600 * 1000;

	public static final String POST_SUCCESS_FLAG = "1";
	public static final String RANDOM_LENGTH_NUMBER = "000000";
	public static final int RANDOM_LENGTH = 6;

	public static final class intents {
		private static Intent takePillNotice;
		private static Intent periodNotice;
//		public static String ACTION_TAKE_PILL = TakePillNoticeReceiver.class.toString();
//		public static String ACTION_PERIOD = PeroidNoticeReceiver.class.toString();

		public static Intent takePillNotice(Context context) {
			if (takePillNotice != null) {
				return takePillNotice;
			}
//			takePillNotice = new Intent(context, TakePillNoticeReceiver.class);
//			takePillNotice.setAction(ACTION_TAKE_PILL);
			return takePillNotice;
		}

		public static Intent periodNotice(Context context) {
			if (periodNotice != null) {
				return periodNotice;
			}
//			periodNotice = new Intent(context, PeroidNoticeReceiver.class);
//			periodNotice.setAction(ACTION_PERIOD);
			return periodNotice;
		}
	}
}
